#include <iostream>
using namespace std;

//Convert pixel color from RGB88 to RGB565
unsigned short ConvertRGB888ToRGB565(int Red, int Green, int Blue)
{
	unsigned short RGB565;
	RGB565 = ((((Red >> 3) & 0xff) << 11) | (((Green >> 2) & 0xff) << 6) | ((Blue >> 3) & 0xff));
	return RGB565;
}

int main()
{
	unsigned short RGB565;
	//Example
	RGB565 = ConvertRGB888ToRGB565(215, 224, 195);
	cout << RGB565;
	cin.get();

	return 0;
}